package com.koron.sinoprobe.web.plan.service;

import com.koron.bean.workflow.RedirectQuery;
import com.koron.sinoprobe.web.plan.bean.entity.SpPlanPackage;
import com.koron.sinoprobe.web.plan.bean.query.SpPlanPackageQuery;
import com.koron.sinoprobe.web.plan.bean.query.SpPlanQuery;
import com.koron.sinoprobe.web.plan.bean.vo.SpPlanPackageVO;
import com.koron.sinoprobe.web.plan.bean.vo.SpPlanVO;
import org.koron.ebs.mybatis.SessionFactory;

import java.util.List;
import java.util.Map;

/**
 * @author twcao
 * @title: SpPlanPackageService
 * @projectName GDH_EAM_V2
 * @description: 专项计划包service
 * @date 2021/11/2417:04
 */
public interface SpPlanPackageService {

    SpPlanPackageVO selectOne(SessionFactory factory, String pkgId);

    List<SpPlanPackageVO> queryList(SessionFactory factory, SpPlanPackageQuery query);

    List<SpPlanVO> queryPlanList(SessionFactory factory, SpPlanQuery query);

    List<Map<String, Object>> groupByPkgId(SessionFactory factory, String pkgId);

    SpPlanVO getPlanById(SessionFactory factory, String planId);

    Boolean deletePlanById(SessionFactory factory, String planId);

    SpPlanPackageVO saveOrUpdate(SessionFactory factory, SpPlanPackageVO detail);

    SpPlanPackage saveOrUpdate(SessionFactory factory, SpPlanPackage bean);

    SpPlanPackageVO submit(SessionFactory factory, SpPlanPackageVO detail);

    SpPlanPackageVO auditFinish(SessionFactory factory, SpPlanPackageVO detail);

    String deleteById(SessionFactory factory, String pkgId);

    /**
     * 工作流更新
     * @param factory
     * @param redirectQuery
     */
    Boolean workflowUpdate(SessionFactory factory, RedirectQuery redirectQuery);
}
